const { xmlWithCDATA } = require("../../tool/xmlWithCDATA");
function textReply(xml, param) {
    let { ToUserName, FromUserName } = xml || {};
    let now = Math.floor(Date.now() / 1000);
    let xmlParam = {
        // 接收方账号（收到的OpenID）
        ToUserName: FromUserName || "",
        // 开发者微信号
        FromUserName: ToUserName || "",
        MsgType: "text",
        //
        CreateTime: now,
        // 内容
        Content: param || "",
    };
    return {
        xml: xmlWithCDATA(xmlParam),
    };
}

module.exports = {
    textReply,
};
